// 屏幕缩放
export function screenSize(editorDom) {
  let screenWidth = document.body.clientWidth || document.documentElement.clientWidth;
  // let screenHeight = document.body.clientHeight || document.documentElement.clientHeight;
  let defWidth = 1920;
  // let defHeight = 1080;
  let xScale = screenWidth / defWidth;
  // let yScale = screenHeight / defHeight;
  editorDom.style.cssText = 'transform: scale(' + xScale + ',' + xScale + ')';

  window.resize(() => {
    console.log("12");
    // 网页可见区域宽：document.body.clientWidth
    let screenWidth = document.body.clientWidth || document.documentElement.clientWidth;
    let screenHeight = document.body.clientHeight || document.documentElement.clientHeight;
    // let t = Math.max(screenWidth, screenHeight);
    // xScale = t / defWidth;
    // yScale = t / defHeight;
    xScale = screenWidth / defWidth;
    // yScale = screenWidth / defHeight;
    console.log(screenWidth, screenHeight);
    editorDom.style.cssText = 'transform: scale(' + xScale + ',' + xScale + ')';
    console.log(editorDom.style.cssText);
    console.log(editorDom.css);
  })
}